package com.juku2024.juku.db.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.OnConflictStrategy;
import androidx.room.Query;

import com.juku2024.juku.db.entity.VersionEntity;


@Dao
public interface VersionDao {

    @Query("SELECT * FROM VersionTable WHERE type=:type")
    VersionEntity query(int type);

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    void insert(VersionEntity entity);

    @Query("DELETE FROM VersionTable WHERE type=:type")
    void deleteByType(int type);

    @Query("DELETE FROM VersionTable")
    void deleteAll();
}
